page.form = {};
page.form.init = function(){
}
page.form.event = {
	submit : function(dialog, callback,index) {
		// 校验
		$('#mainForm').validate();
		var validate = $('#mainForm').valid();
		if (validate) {
			var data = $('#mainForm').serialize() // 要提交的表单,必须使用name属性
			$.dataPost(contextPath + "/common/updatePassword.htm", data,function(result) {
				if (result.success) {
					if (callback)callback();
					layer.msg(result.msg,function(){
						dialog.close(index);
					});
				} else {
					layer.msg(result.msg);
				}
			});
		}

	}
}
